var app = getApp()
var util = require('../../utils/util.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    var ticketType = options.paytype;//票类型：1：飞机，0：火车
    var orderN = options.orderN;
    var money = options.money;
    var fromType = options.resultType;//结果类型：0：下单，1：支付
    var payTime = util.getNowFormatDateHHMMSS();
    that.setData({
      successType: ticketType,
      orderNo:orderN,
      money:money,
      fromType:fromType,
      payTime:payTime,
    })
    
  },
  //查看订单
  lookOrder:function() {
  

    if (this.data.successType == 1) {//机票
      wx.redirectTo({
        url: '../myOrder/myOrder?type=' + 0,
      })
    } else {
      wx.redirectTo({
        url: '../myOrder/myOrder?type=' + 1,
      })
    }
  }
})